#pragma once

#include "IPageChangeHooker.h"
#include "PatchingUtils.h"
#include "offsetsCalc.h"


class TF3DHooker: public IPageChangeHooker
{
public:
	 virtual void Hook(PageChangeCallbackFn pageChangeCallback);
	 virtual void UnHook();
	 virtual void Initialize(Logger* logger, TODAYTABSETTINGS* settings);
	 virtual HWND GetManilaWindow();
	 static TF3DHooker* get_Instance();

private:
	bool ApplyPatch(MANILA_TODAY_PATCH_SETTINGS* patch);
	void NavigateInCompleteInfo(LPVOID a1, WCHAR* a2, LPVOID a3);
	static void StaticNavigateInCompleteInfo(LPVOID a1, WCHAR* a2, LPVOID a3);
	DWORD PrintPageName(LPVOID a1, WCHAR* a2, LPVOID a3, LPVOID a4);
	static DWORD StaticPrintPageName(LPVOID a1, WCHAR* a2, LPVOID a3, LPVOID a4);
	TF3DHooker();

private:
	static TF3DHooker* _instance;
	
	Logger* _logger;
	TODAYTABSETTINGS* _settings;
	PageChangeCallbackFn _callback;
	MANILA_TODAY_PATCH_SETTINGS appliedPatch;
	bool navigate;
};